package demo10;

import java.util.Random;

public class Test {
    public static void main(String[] args) {
        Integer[] arr = {12, 3, 4, 43, 43, 43, 32, 12, 35, 6, 5};
        Integer num = new CallImpl<>(new Call<Integer>() {
            @Override
            public Integer getRandomData(Integer[] arr) {
                Random random = new Random();
                int index = random.nextInt(arr.length);
                return arr[index];
            }
        }).getRandomData(arr);
        System.out.println(num);
    }
}
